// Author: wsfuyibing <682805@qq.com>
// Date: 2025-05-06

package kind

type DeviceType string

const (
	DeviceTypePhone DeviceType = "phone"
	DeviceTypePad   DeviceType = "pad"
	DeviceTypePc    DeviceType = "pc"
)

var (
	deviceTypeText = map[DeviceType]string{
		DeviceTypePhone: "手机",
		DeviceTypePad:   "平板",
		DeviceTypePc:    "电脑",
	}
	deviceTypeUndefined = "其它"
)

func (o DeviceType) String() string {
	return string(o)
}

func (o DeviceType) Text() string {
	if str, ok := deviceTypeText[o]; ok {
		return str
	}
	return deviceTypeUndefined
}
